<?php
class HomesController extends AppController {
    public function index() {
    	$this->layout = 'pharmarket';
    	$cOuvertesConditions = array('conditions' => array('Commande.etat_id'=> 1));
        $this->set('cOuvertes', ClassRegistry::init('Commande')->find('count', $cOuvertesConditions));
        $cEnCoursConditions = array('conditions' => array('Commande.etat_id'=> 2));
        $this->set('cEnCours', ClassRegistry::init('Commande')->find('count', $cEnCoursConditions));
        $cTermineConditions = array('conditions' => array('Commande.etat_id'=> 3));
        $this->set('cTermine', ClassRegistry::init('Commande')->find('count', $cTermineConditions));
        $stockNbr = array('conditions' => array('Stock.quantite >'=> 0));
        $this->set('stockNbr', ClassRegistry::init('Stock')->find('count', $stockNbr));
        $this->set('productNbr', ClassRegistry::init('Product')->find('count'));
    }
}